<template>
  <el-card shadow="never">
    <el-form :inline="true" :model="queryForm" label-width="120">
      <el-form-item label="企业名称">
        <el-input v-model="queryForm.user" style="width: 250px;" clearable/>
      </el-form-item>
      <el-form-item label="所属区县">
        <el-select
            v-model="queryForm.region"
            clearable
            style="width: 250px;"
        >
          <el-option v-for="(item,index) in ['万秀区','长洲区','龙圩区','苍梧县','藤县','蒙山县','岑溪市']"
                     :label="item" :value="index"/>
        </el-select>
      </el-form-item>
      <el-form-item label="企业标签">
        <el-select
            v-model="queryForm.bao"
            clearable
            style="width: 250px;"
        >
          <el-option v-for="(item,index) in ['电子信息','汽车','数字经济','互联网软件信息技术服务业企业','智能电气','新能源（节能环保）','大优强培育企业','上市冠军','单项冠军']" :label="item" :value="index"/>
        </el-select>
      </el-form-item>
      <el-form-item label="触达条件">
        <el-select
            v-model="queryForm.fang"
            clearable
            style="width: 250px;"
        >
          <el-option v-for="(item,index) in ['2023年2月省级规下企业','2023年2月规下企业']" :label="item"
                     :value="index"/>
        </el-select>
      </el-form-item>
      <el-form-item label="是否有关联电话">
        <el-select
            v-model="queryForm.fang"
            clearable
            style="width: 250px;"
        >
          <el-option v-for="(item,index) in ['是','否']" :label="item"
                     :value="index"/>
        </el-select>
      </el-form-item>
      <el-form-item label="是否发送过短信">
        <el-select
            v-model="queryForm.fang"
            clearable
            style="width: 250px;"
        >
          <el-option v-for="(item,index) in ['是','否']" :label="item"
                     :value="index"/>
        </el-select>
      </el-form-item>
      <el-form-item >
        <el-checkbox v-model="queryForm.checked" label="只看已智配企业" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
    </el-form>
  </el-card>
  <br>
  <el-table :data="companySearchPolicyData" border :header-cell-style="{ background: '#e6f3ff', color: '#333333' }">>
    <el-table-column type="index" label="序号" width="60"/>
    <el-table-column prop="companyName" label="企业名称"/>
    <el-table-column prop="matchResult" label="触达条件" align="center"/>
    <el-table-column prop="contact" label="联系人方式" align="center" width="200"/>
    <el-table-column prop="deptName" label="所属区县" align="center" width="150"/>
    <el-table-column prop="policyCount" label="政策匹配" align="center" width="150"/>
    <el-table-column prop="smsCount" label="发送短信次数" align="center" width="150"/>
  </el-table>
  <div class="table-footer">
    <el-pagination background layout="prev, pager, next" :total="1000"/>
  </div>
</template>

<script setup>
import {reactive} from 'vue'
import {companySearchPolicyData} from '../data/data.js'

const queryForm = reactive({
  user: '',
  region: 0,
  bao: 0,
  fang: 0,
  checked:null
})

const onSubmit = () => {
  console.log('submit!')
}
</script>


<style scoped lang="scss">
.table-footer {
  padding: 20px;
  background-color: #ffffff;
  display: flex;
  justify-content: right;
}
</style>
